
<template>
	<el-radio-group v-bind="$attrs" :disabled="disabled">
		<template v-if="button">
			<el-radio-button v-for="item in options" :key="item.value" :label="item.value">
				{{ item.label }}
			</el-radio-button>
		</template>
		<template v-else>
			<el-radio v-for="item in options" :key="item.value" :label="item.value">
				{{ item.label }}
			</el-radio>
		</template>
	</el-radio-group>
</template>
<script>
export default {
	name: "exRadioGroup",
	components: {},
	props: {
		button: {type: Boolean, default: false},
		disabled: {type: Boolean, default: false},
		dictCode: {type: String, default: null},
		isPriKey: {type: Boolean, default: false},
	},
	data() {
		return {
			options: [],
		};
	},
	async mounted() {
		this.options = await this.$cache.dic.options(this.dictCode, this.isPriKey);
	},
	methods: {}
}
</script>
